Relational Databases For Agile Developers by Ron Ballard
Author:Ron Ballard [Ballard, Ron]
Language: eng
Format: azw3
Publisher: UNKNOWN
Published: 2017-08-30T04:00:00+00:00
Data-types for Surrogate Keys
Surrogate keys are keys made up by the system (the application or the database). They have no meaning outside the database. Surrogate keys are usually positive integers, stored in four bytes with a range from one to just over two billion. This gives more than enough unique values for most tables. For very large tables, such as transaction tables in retail or banking systems, or machine-generated data, such as telematics, you will often need larger numbers. In these cases you can use a big integer, an 8-byte number that can hold over 9,000,000,000,000,000,000. I had to look up what that is called; it's nine quintillion. It doesn't really matter; it should be big enough. Of course, if you are using Oracle, then the default is a 38-digit number. I never understood why, but it seems to work.
It is not unusual now to use UUIDs for primary keys. A UUID is a 36-character string that uses a complex combination of factors that may include the machine address, the current timestamp, random numbers and hashes of locally stored values. This is all to try to ensure unique keys in distributed systems where it is not feasible to go to a single source to get the next unused value. In fact only 32 of the characters are significant, but there are four hyphens, which are always the same and always in the same positions. A well-generated UUID is probably unique, but uniqueness cannot be guaranteed.
If you don't have a distributed database, and if the chances are vanishingly small of it ever being a distributed database, with a very, very large number of records, I would suggest that you use integers instead of UUIDs.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(27095)
Hello! Python by Anthony Briggs(25950)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(25286)
Kotlin in Action by Dmitry Jemerov(24396)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(23591)
Dependency Injection in .NET by Mark Seemann(23313)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(21948)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(20852)
Grails in Action by Glen Smith Peter Ledbrook(19869)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17073)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(16833)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(14464)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(12584)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11866)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10652)
Hit Refresh by Satya Nadella(9239)
The Kubernetes Operator Framework Book by Michael Dame(8588)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8446)
Robo-Advisor with Python by Aki Ranin(8391)